package main

import (
	"context"
	"fmt"

	reflectPb "gitee.com/wu-jin-feng/fgin/demos/fplugs_grpc_test/pb"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
)

func main() {
	conn, err := grpc.NewClient("localhost:8085", grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		panic(err)
	}
	defer conn.Close()
	c := reflectPb.NewDemoServiceClient(conn)
	params := reflectPb.GetSchemeReq{
		Path: "321222",
		Info: &reflectPb.GetSchemeRespInfo{
			Info: "哈哈哈哈",
			Name: "gogo",
		},
	}
	res, err := c.GetScheme(context.Background(), &params)
	if err != nil {
		panic(err)
	}
	fmt.Println(res)
}
